home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_item_pickuplines.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  71 lines

  1. # ===================================================================
  2. # Jones 3D Cog Script
  3. #
  4. # item_PickupLines.cog
  5. #
  6. # This cog tracks and chooses preliminary voice lines for item pickups.
  7. #
  8. # [RT]
  9. #
  10. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  11. # ===================================================================
  12.  
  13. symbols
  14.  
  15.     message startup
  16.     message user0
  17.  
  18.     sound    talk=INXJ139.wav    local # Look what I found...
  19.     sound    talk1=INXJ142.wav    local # What have we here?
  20.     sound    talk2=INXJ002.wav    local # What's this?
  21.     sound    talk3=INXJ143.wav    local # Now what?
  22.     sound    talk4=INXJ008a.wav    local # Hey...
  23.     sound    talk5=INXJ146.wav    local # Hmm...
  24.     sound    talk6=INXJ147.wav    local # Aha...
  25.  
  26.     thing    indy                local
  27.  
  28.     int        newLine=-1            local
  29.  
  30.     int        oldLine0=-1            local
  31.     int        oldLine1=-1            local
  32.     int        oldLine2=-1            local
  33.  
  34.     int        bBusy=0                local
  35.     
  36. end
  37.  
  38. # ===================================================================
  39.  
  40. code
  41.  
  42. startup:
  43.  
  44.     indy = GetLocalPlayerThing();
  45.     return;
  46.  
  47. # -------------------------------------------------------------------
  48.  
  49. user0:
  50.  
  51.     if (bBusy) return;
  52.  
  53.     bBusy = 1;
  54.  
  55.     while ((newLine == oldLine0) || (newLine == oldLine1) || (newLine == oldLine2))
  56.     {        
  57.         newLine = RandBetween(0, 6);
  58.     }
  59.     
  60.     oldLine2 = oldLine1;
  61.     oldLine1 = oldLine0;
  62.     oldLine0 = newLine;
  63.  
  64.     PlayVoice(indy, talk[newLine], 1.0, 1);
  65.     bBusy = 0;
  66.  
  67.     return;
  68.  
  69. end
  70.  
  71.